package heartbeat

import (
	"time"

	"lib/utils"
	"lib/rabbitmq"
)

func StartHeartbeat() {
	q := rabbitmq.New(utils.RabbitServer())
	defer q.Close()
	for {
		q.Publish(utils.ApiServerName(), utils.ServerAddr())
		time.Sleep(5 * time.Second)
	}
}
